<?php 
namespace Redis;
class RedisModel
{
    private $redis;
	public function __construct(){
phpinfo();
		// $this->redis = new redis();
		// $this->redis->connect('127.0.0.1','6379');
		$redis = new Redis();
   $redis->connect('127.0.0.1', 6379);
   echo "Connection to server sucessfully";
   //check whether server is running or not
   echo "Server is running: " . $redis->ping();
	}

	public function set2($name,$value){

		$res =$this->redis($name,$value);
		return $res;
	}

	public function get2($name){

		$res = $this->redis->get($name);
		return $res;
	}
}
 ?>